/**
 * 桌子列表项
 * by wyy
 */
class deskListItem extends GameObject implements eui.UIComponent {
    public titleLbl: eui.Label;
    private round: number;
    private no: number;

    constructor(round, no) {
        super();
        this.skinName = "resource/eui_skins/game_skins/deskListItemSkin.exml";
        this.round = round;
        this.no = no;
    }
    addToStage() {
        this.titleLbl.text = `第${this.no.toString()}桌`;
    }
    onRemove() { }
    firstCreate() {
        this.addEventListener(egret.TouchEvent.TOUCH_TAP, this.showResult, this);
    }
    private showResult() {
        nano.request("gamemanager.getsomedeskrank", { round: this.round, desk_num: this.no }, (d) => {
            globalObject.getInstance().debugConsole(`第${this.round}轮 第${this.no}桌 桌子信息`, d);
            let r = new resultScene(d,this.round, this.no);
            SceneManager.getInstance().closeWindow();
            SceneManager.getInstance().changeScene(r);
        });
    }
}